<template>
  <div>
    <IndexHeader />
    <IndexBanner :bannerList="bannerList" />
    <IndexListHot :goodsList="goodsList" />
  </div>
</template>

<script>
import IndexHeader from "./Index-header";
import IndexBanner from "./Index-banner";
import IndexListHot from "./Index-list-hot";

export default {
  components: {
    IndexHeader,
    IndexBanner,
    IndexListHot
  },
  data() {
    return {
      bannerList: [],
      goodsList: []
    };
  },
  async activated() {
    var data = await this.$http.get("/index.php/getHomeData", {
      params: {}
    });
    this.goodsList = data.data.goodsList;
    this.bannerList = data.data.bannerList;
  }
};
</script>

<style>
</style>